﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Micro.Core.ServiceDiscovery
{
    /// <summary>
    /// 服务发现
    /// </summary>
    public interface IServiceDiscovery
    {
        /// <summary>
        /// 获取所有服务信息
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        List<T> GetServices<T>();

        /// <summary>
        /// 根据服务名获取服务信息
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="serviceName">服务名</param>
        /// <returns></returns>
        List<T> GetService<T>(string serviceName);
    }
}
